Digital-to-analog converters and methods thereof

ABSTRACT

A digital-to-analog converter for converting a digital signal into an analog signal is provided. The digital-to-analog converter includes a preprocessing unit, a gain controller, a modulator and an output unit. The preprocessing unit receives and oversamples the digital signal to generate an oversampled signal. The gain controller generates an adjusted signal with a gain function according to a reference signal associated with the oversampled signal when a specific condition is present. The modulator modulates the adjusted signal and generates a modulated signal. The output unit provides the analog signal to a load according to the modulated signal, wherein the analog signal gradually approaches to a specific level according to the gain function when the specific condition is present.

BACKGROUND

1. Technical Field

The disclosed embodiments relate to a digital-to-analog converter, andmore particularly to a digital-to-analog converter with power on/offtransient suppression.

2. Description of the Related Art

Currently, digital-to-analog converters (DACs) are widely used in audioand video applications, which are devices for converting a digital(usually binary) code to at least an analog signal. In audioapplications, the DAC may have a single-end output or differentialoutputs for driving a load, such as a headphone or a speaker, accordingto design consideration for various products.

In single-end output DACs, a direct current (DC) blocking capacitor maybe employed between an amplifier of the DAC and a load in order to blockthe DC voltage. However, the single-end DAC may suffer from largetransient signals appearing at the outputs when initially powered on.Such DACs present an analog output centered on a signal ground level,such as ½ VDD. The transient signal occurs when a power is applied tothe DAC, and the analog outputs are required to move from a ground (GND)level to the signal ground level. If the transient signal occursrapidly, it can be approximated as a step function, which has energy atall frequencies. On power-up, such a system can suffer an annoyingnoise, such as a “pop” or “click”, heard by a speaker when the DACinitially charges the blocking capacitor to the signal ground level.

Similarly, a click or pop may occur when the system is powered off. Onentering the power-off state, the charge on the blocking capacitorremains. When the power is removed, the residual charge of the blockingcapacitor may discharge rapidly across the load resulting in a loudnoise.

BRIEF SUMMARY

Digital-to-analog converters for converting a digital signal into ananalog signal and methods thereof are provided. An exemplary embodimentof a digital-to-analog converter for converting a digital signal into ananalog signal is provided. The digital-to-analog converter comprises apreprocessing unit, a gain controller, a modulator and an output unit.The preprocessing unit receives and oversamples the digital signal togenerate an oversampled signal. The gain controller generates anadjusted signal with a gain function according to a reference signalassociated with the oversampled signal when a specific condition ispresent. The modulator modulates the adjusted signal and generates amodulated signal. The output unit provides the analog signal to a loadaccording to the modulated signal, wherein the analog signal graduallyapproaches to a specific level according to the gain function when thespecific condition is present.

Moreover, an exemplary embodiment of a digital-to-analog converter forconverting a digital signal into an analog signal is provided. Thedigital-to-analog converter comprises a gain controller, a preprocessingunit, a modulator and an output unit. The gain controller receives thedigital signal, adjusts the received digital signal with a gainfunction, and generates an adjusted signal when a specific condition ispresent. The preprocessing unit oversamples the adjusted signal togenerate an oversampled signal. The modulator modulates the oversampledsignal and generates a modulated signal. The output unit provides theanalog signal to a load according to the modulated signal, wherein theanalog signal gradually approaches to a specific level according to thegain function when the specific condition is present.

Furthermore, an exemplary embodiment of a method for converting adigital signal into an analog signal by a digital-to-analog converterwith an output unit is provided. The digital signal is oversampled. Anadjusted signal is generated with a gain function when a specificcondition is present. The adjusted signal is modulated. The analogsignal is provided according to the modulated signal, wherein the analogsignal gradually approaches to a specific level according to the gainfunction when the specific condition is present.

A detailed description is given in the following embodiments withreference to the accompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

The invention can be more fully understood by reading the subsequentdetailed description and examples with references made to theaccompanying drawings, wherein:

FIG. 1 shows a schematic diagram illustrating a system with adigital-to-analog converter (DAC) according to an embodiment of theinvention;

FIG. 2 shows a schematic diagram illustrating a gain controlleraccording to an embodiment of the invention;

FIG. 3 shows an exemplary waveform diagram illustrating the signals ofthe gain controller of FIG. 2, wherein the gain controller isimplemented in a single-end output system;

FIG. 4 shows an exemplary waveform diagram illustrating the signals ofthe gain controller of FIG. 2, wherein the gain controller isimplemented in a differential output system;

FIG. 5 shows a schematic diagram illustrating a system with a DACaccording to another embodiment of the invention; and

FIG. 6 shows a schematic diagram illustrating a gain controlleraccording to an embodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

The following description is of the best-contemplated mode of carryingout the invention. The description is made for the purpose ofillustrating the general principles of the invention and should not betaken in a limiting sense. The scope of the invention is best determinedby reference to the appended claims.

FIG. 1 shows a schematic diagram illustrating a system 100 with adigital-to-analog converter (DAC) 120 according to an embodiment of theinvention. The system 100 is used to provide an analog signal S_(out) todrive a load 114 via a capacitor 112. For example, the analog signalS_(out) is an audio signal and the load 114 may be a headphone or aspeaker. The system 100 comprises a host 102, a digital signal processor(DSP) 104, a programmable register unit 106, a random access memory(RAM) 108 and the DAC 120. The host 102 may be a central processing unit(CPU) or a reduced instruction set computer (RISC). The host 102controls the programmable register unit 106 to receive a digital signalD from the DSP 104 or the RAM 108. After receiving the digital signal D,the programmable register unit 106 accordingly provides a digital signalS_(in) to the DAC 120 according to configurations from the host 102. Inone embodiment, the system 100 further comprises a direct memory access(DMA) engine 110 for accessing the RAM 108 to retrieve data as thedigital signal S_(in).

Referring to FIG. 1, the DAC 120 comprises a preprocessing unit 122, anoise shaper 124, a gain controller 126, a modulator 128 and an outputunit 130. The preprocessing unit 122 comprises an up sample circuit foroversampling the digital signal S_(in) to obtain a signal S_(p). Forexample, the preprocessing unit 122 may oversample the digital signalS_(in) sampled at 48 KHz to 384 KHz. In general, one of the noiseshaping algorithms used in image processing is ‘Floyd Steinbergdithering’, and many noise shaping algorithms used in audio processingare based on an ‘Absolute threshold of hearing’ model. Afteroversampling, the noise shaper 124 performs a noise shaping algorithm toreduce the noise of signal S_(p) by shifting it away from the desirableband. For example, if the signal S_(p) is an audio signal, the noiseshaper 124 may shape the audio signal S_(p) to suppress in-band noise byshifting the noise away from the audio band (0 to 20 KHz) withdelta-sigma modulation. After noise shaping, the noise shaper 124provides a signal S_(n) to the gain controller 126, so as to provide asignal S_(g) to the modulator 128 by the gain controller 126 accordingto the signals S_(EN) and S_(up) from the host 102. The gain controller126 will be described in detail below. The signal S_(g) is inputted tothe modulator 128 and is modulated into a signal S_(m) with a specificmodulation, such as Pulse-width modulation (PWM), Pulse-densitymodulation (PDM), delta-sigma modulation and so forth, wherein themodulation type is determined according to applications. The output unit130 then receives the signal S_(m) to generate and output the analogsignal S_(out) to the load 114. In an embodiment of the invention, theoutput unit 130 comprises a low pass filter (LPF) 132 and a poweramplifier 134. The LPF 132 filters the signal S_(m) to obtain a signalS_(f), and then the signal S_(f) is amplified by the power amplifier 134to generate the analog signal S_(out) to the load 114 via the capacitor112. The LPF 132 and the power amplifier 134 may be single-end outputtype circuits or the differential output type circuits, which aredetermined according to the load 114.

FIG. 2 shows a schematic diagram illustrating a gain controller 200according to an embodiment of the invention. The gain controller 200comprises a buffer 202, a multiplier 204, a coefficient generator 206, acontrol unit 208, a speeding up unit 210 and a selecting unit 212.Referring to FIG. 1 and FIG. 2 together, the buffer 202 is used tobuffer the signal S_(n) from the noise shaper 124 and provide a signalS_(Buffer) to the multiplier 204. Furthermore, when the control unit 208receives the signal S_(EN) indicating that a specific condition ispresent, a control signal S_(ctrl) is provided to the coefficientgenerator 206, so as to allow the coefficient generator 206 to generatethe corresponding coefficient S_(coeff) according to a gain function,wherein whether the specific condition is present or absent isdetermined by the host 102. For example, when a power on or offprocedure of the output unit 130 is being processed, the host 102determines that the specific condition is present such that the analogsignal S_(out) is controlled to avoid false action for the load 114. Thegain function may be a ramp function, an exponent function, a functionformed by a look-up table, or other mathematical functions and so on.

Referring to FIG. 2, when receiving the signal S_(Buffer) and thecoefficient S_(coeff), the multiplier 204 multiplies the signalS_(Buffer) by the coefficient S_(coeff) to obtain a signal S_(Multout).The speeding up unit 210 receives the signal S_(Multout) to provide asignal S_(gain) according to the signal S_(up) which indicates whetherto speed up control over the analog signal S_(out). When the specificcondition is present and the signal S_(gain) is ready, the control unit208 controls the selecting unit 212 via a signal S_(MUX) to select thesignal S_(gain) as the signal S_(g). On the contrary, when the specificcondition is absent, the control unit 208 controls the selecting unit212 to select the signal S_(n) as the signal S_(g). In the embodiment,the selecting unit 212 is a multiplexer.

FIG. 3 shows an exemplary waveform diagram illustrating the signals ofthe gain controller 200, wherein the gain controller 200 is implementedin a single-end output system. During a time period T1, the signalS_(EN) is changed from a low to high logic level when a specificcondition is present, such as when a power off procedure of an outputunit of the single-end output system is being processed or when a muteprocedure is enabled. As shown in FIG. 3, the signal S_(n) is acontinuous signal, such as a 1 KHz signal for an audio application.Referring to FIG. 2 and FIG. 3 together, at time period T1, the controlunit 208 controls the coefficient generator 206 to generate thecorresponding coefficient S_(coeff) according to a ramp down function.Accordingly, the signal S_(g) gradually approaches to a level L₁. Asignal S_(gs) of FIG. 3 indicates the output of the selecting unit 212when the speeding up unit 210 is active, i.e. the signal S_(up)indicates that speed up is needed. Therefore, the signal S_(gs)approaches to the level L₁ earlier than the signal S_(g) during timeperiod T1. During a time period T2, the signal S_(EN) remains at a highlogic level when another specific condition is present, such as when apower on procedure of the output unit is being processed or when themute procedure is disenabled and changes to a low logic levelthereafter. At time period T2, the control unit 208 controls thecoefficient generator 206 to generate the corresponding coefficientS_(coeff) according to a ramp up function. Accordingly, the signal S_(g)gradually approaches to a level L₂. Similarly, the signal S_(gs)approaches to the level L₂ earlier than the signal S_(g) during timeperiod T2. In the embodiment, the speeding up unit 210 may comprise alogical shifter for performing a shift right arithmetic operation tospeed up the signal S_(gs) from the level L₂ to level L₁ and performinga shift left arithmetic operation to speed up the signal S_(gs) from thelevel L₁ to level L₂. Referring to FIG. 1 and FIG. 3, the waveform ofthe analog signal S_(out) is substantially similar to the signal S_(g),as known in the art. Therefore, the load 114 may receive the analogsignal S_(out) with gradually decreased amplitude at time period T1 andreceive the analog signal S_(out) with gradually increased amplitude attime period T2, thus avoiding the loud noise caused by power on/offtransient when the load 114 is a headphone or a speaker.

FIG. 4 shows an exemplary waveform diagram illustrating the signals ofthe gain controller 200, wherein the gain controller 200 is implementedin a differential output system. In the embodiment, the system is usedfor audio application and the signal S_(EN) is changed to a high logiclevel until a mute procedure is disabled. At time period Tmute, thesignal S_(g) gradually approaches to a DC level L_(DC) and then regainsto the waveform of the signal S_(n), as shown in FIG. 4. For example, atthe beginning of the time period Tmute, the gain controller 200generates the signal S_(g) with an amplitude higher than the DC levelL_(DC) according to a gain function f1 and the signal S_(g) with anamplitude lower than the DC level L_(DC) according to a gain functionf2. At the end of the time period Tmute, the gain controller 200generates the signal S_(g) with an amplitude higher than the DC levelL_(DC) according to a gain function f3 and the signal S_(g) with anamplitude lower than the DC level L_(DC) according to a gain functionf4.

FIG. 5 shows a schematic diagram illustrating a system 500 with a DAC510 according to another embodiment of the invention. Compared with thesystem 100 of FIG. 1, the system 500 comprises the DAC 510 having a gaincontroller 512, a preprocessing unit 514, a noise shaper 516, amodulator 518 and an output unit 520, wherein the gain controller 512 isdisposed between the programmable register unit 106 and thepreprocessing unit 514. Therefore, the gain controller 512 receives thedigital signal S_(in) from the programmable register unit 106, andprovides the signal S_(g) to the preprocessing unit 514 according to thesignals S_(EN) and S_(MUX). When the signal S_(EN) indicates that aspecific condition is present, the gain controller 512 adjusts thedigital signal S_(in) with at least a gain function. Otherwise, the gaincontroller 512 directly transmits the digital signal S_(in) to thepreprocessing unit 514 as the signal S_(g) without adjustment. Next, thepreprocessing unit 514 oversamples the signal S_(g) to obtain the signalS_(p). After oversampling, the noise shaper 516 performs a noise shapingalgorithm to reduce the noise of signal S_(p) by shifting it away fromthe desirable band to obtain the signal S_(n). The signal S_(n) isinputted to the modulator 518 and is modulated into the signal S_(m)with a specific modulation, such as PWM, PDM, delta-sigma modulation andso forth, wherein the modulation type is determined according toapplication. In the output unit 520, the LPF 522 filters the signalS_(m) to obtain the signal S_(f), and the power amplifier 134 amplifiesthe signal S_(f) to obtain the analog signal S_(out).

FIG. 6 shows a schematic diagram illustrating a gain controller 600according to an embodiment of the invention. The gain controller 600comprises a coefficient generator 610, a multiplier 620 and a selectingunit 630. Referring to FIG. 5 and FIG. 6 together, when receiving thesignal SEN indicating that a specific condition is present, thecoefficient generator 610 starts to generate the correspondingcoefficient S_(coeff) according to a gain function, wherein whether thespecific condition is present or absent is determined by the host 102.For example, when a power on or off procedure of the output unit 520 isbeing processed, the host 102 determines that the specific condition ispresent such that the analog signal S_(out) is controlled to avoid falseaction for the load 114. Furthermore, the gain function may be a rampfunction, an exponent function, a function formed by a look-up table, orother mathematical functions and so on. When receiving the digitalsignal S_(in) and the coefficient S_(coeff), the multiplier 620multiplies the digital signal S_(in) by the coefficient S_(coeff) toobtain the signal S_(Multout). Therefore, the host 102 may control theselecting unit 630 via the signal S_(MUX) to select the signalS_(Multout) as the signal S_(g) when the specific condition is present,and may control the selecting unit 630 to select the digital signalS_(in) as the signal S_(g) when the specific condition is absent. In oneembodiment, a buffer coupled between the programmable register unit 106and the multiplier 620 is added to buffer the digital signal S_(in), anda speeding up unit coupled between the multiplier 620 and the selectingunit 630 is added to speed up the change of the signal S_(g).

While the invention has been described by way of example and in terms ofpreferred embodiment, it is to be understood that the invention is notlimited thereto. Those who are skilled in this technology can still makevarious alterations and modifications without departing from the scopeand spirit of this invention. Therefore, the scope of the presentinvention shall be defined and protected by the following claims andtheir equivalents.

1. A digital-to-analog converter for converting a digital signal into ananalog signal, comprising: a preprocessing unit receiving andoversampling the digital signal to generate an oversampled signal; again controller generating an adjusted signal with a gain functionaccording to a reference signal associated with the oversampled signalwhen a specific condition is present; a modulator modulating theadjusted signal and generating a modulated signal; and an output unitproviding the analog signal to a load according to the modulated signal,wherein the analog signal gradually approaches to a specific levelaccording to the gain function when the specific condition is present.2. The digital-to-analog converter as claimed in claim 1, wherein thegain controller directly transmits the reference signal to the modulatorwhen the specific condition is absent.
 3. The digital-to-analogconverter as claimed in claim 1, further comprising a noise shapershaping the oversampled signal to generate a shaped signal, wherein thereference signal is the oversampled signal or the shaped signal.
 4. Thedigital-to-analog converter as claimed in claim 1, wherein the gaincontroller comprises: a coefficient generator generating a plurality ofcoefficients according the gain function; a multiplier multiplying thereference signal by the coefficients to obtain the adjusted signal; anda selecting unit providing the reference signal to the modulator whenthe specific condition is absent and providing the adjusted signal tothe modulator when the specific condition is present.
 5. Thedigital-to-analog converter as claimed in claim 4, wherein the gaincontroller further comprises: a buffer storing the reference signal; anda speeding up unit coupled between the selecting unit and themultiplier, speeding up the adjusted signal to approach the specificlevel.
 6. The digital-to-analog converter as claimed in claim 1, whereinthe specific condition is present when a power on or off procedure ofthe output unit is being processed.
 7. The digital-to-analog converteras claimed in claim 1, wherein the gain function comprises a rampfunction or an exponential function.
 8. The digital-to-analog converteras claimed in claim 1, wherein the output unit comprises: a low passfilter filtering the modulated signal; and a power amplifier amplifyingthe filtered signal to generate the analog signal to the load.
 9. Thedigital-to-analog converter as claimed in claim 1, wherein the modulatormodulates the adjusted signal with a Pulse-width modulation, aPulse-density modulation or a delta-sigma modulation.
 10. Adigital-to-analog converter for converting a digital signal into ananalog signal, comprising: a gain controller receiving the digitalsignal, adjusting the received digital signal with a gain function, andgenerating an adjusted signal when a specific condition is present; apreprocessing unit oversampling the adjusted signal to generate anoversampled signal; a modulator modulating the oversampled signal andgenerating a modulated signal; and an output unit providing the analogsignal to a load according to the modulated signal, wherein the analogsignal gradually approaches to a specific level according to the gainfunction when the specific condition is present.
 11. Thedigital-to-analog converter as claimed in claim 10, wherein the gaincontroller directly transmits the received signal to the preprocessingunit when the specific condition is absent.
 12. The digital-to-analogconverter as claimed in claim 11, wherein the gain controller comprises:a coefficient generator generating a plurality of coefficients accordingthe gain function; a multiplier multiplying the received digital signalby the coefficients to obtain the adjusted signal; and a selecting unitproviding the received digital signal to the preprocessing unit when thespecific condition is absent and providing the adjusted signal to thepreprocessing unit when the specific condition is present.
 13. Thedigital-to-analog converter as claimed in claim 12, wherein the gaincontroller further comprises: a buffer storing the received digitalsignal; and a speeding up unit coupled between the selecting unit andthe multiplier, speeding up the adjusted signal to approach the specificlevel.
 14. The digital-to-analog converter as claimed in claim 10,wherein the specific condition is present when a power on or offprocedure of the output unit is being processed.
 15. Thedigital-to-analog converter as claimed in claim 10, wherein the gainfunction comprises a ramp function or an exponential function.
 16. Thedigital-to-analog converter as claimed in claim 10, wherein the outputunit comprises: a low pass filter filtering the modulated signal; and apower amplifier amplifying the filtered signal to generate the analogsignal to the load.
 17. The digital-to-analog converter as claimed inclaim 10, wherein the modulator modulates the adjusted signal with aPulse-width modulation, a Pulse-density modulation or a delta-sigmamodulation.
 18. A method for converting a digital signal into an analogsignal by a digital-to-analog converter with an output unit, comprising:oversampling the digital signal to generate an oversampled signal;generating an adjusted signal with a gain function according to areference signal associated with the oversampled signal when a specificcondition is present; modulating the adjusted signal to generate amodulated signal; and providing the analog signal according to themodulated signal, wherein the analog signal gradually approaches to aspecific level according to the gain function when the specificcondition is present.
 19. The method as claimed in claim 18, wherein themodulation comprises modulating the reference signal to generate themodulated signal when the specific condition is absent.
 20. The methodas claimed in claim 19, further comprising shaping the oversampledsignal to generate a shaped signal, wherein the reference signal is theoversampled signal or the shaped signal.
 21. The method as claimed inclaim 18, wherein the output unit of the digital-to-analog converterprovides the analog signal to a load, and the specific condition ispresent when a power on or off procedure of the output unit is beingprocessed.
 22. The method as claimed in claim 18, wherein the gainfunction comprises a ramp function or an exponential function.